package com.huirui.server.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 订单响应视图对象，用于接口返回订单相关信息
 */
@Data
@Schema(description = "订单响应信息")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class OrderResponseVo {

    @Schema(description = "订单ID", example = "10001")
    private Long orderId;

    @Schema(description = "订单编号", example = "ORD202310150001")
    private String orderNumber;


    @Schema(description = "订单创建时间", example = "2023-10-15T18:30:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @Schema(description = "订单状态")
    private Integer status;

    @Schema(description = "订单总价格", example = "5999.00", format = "decimal")
    private BigDecimal price;

    @Schema(description = "订单包含的商品信息")
    private List<OrderResponseProductVo> productVoList;
}